The SPREADPLOT function creates and returns a spreadplot. The arguments are as follows:
  
Required argument: PLOTMATRIX 
Keyword arguments (with default values):
(CONTAINER *SPREADPLOT-CONTAINER*) 
(SPAN-RIGHT NIL) 
(SPAN-DOWN  NIL) 
(REL-WIDTHS  NIL) 
(REL-HEIGHTS  NIL) 
(LOCAL-LINKS T) 
(STATISTICAL-OBJECT  NIL) 
(MENU-TITLE "SpreadPlot") 
(SHOW NIL) 
(SIZE (EFFECTIVE-SCREEN-SIZE)) 
(SUPPLEMENTAL-PLOT NIL) 

PLOTMATRIX is a matrix of plot or dialog box objects (called plot-objects). The plot-objects in PLOTMATRIX are assumed to already exist and to have all been created while CONTAINER was enabled (all must have the same container, which must be CONTAINER). SPREADPLOT then arranges  these plots inside CONTAINER in a rectangular array according to the details described below. 

  Usually there is one object per matrix cell, in which case the objects are laid out adjacent to each other, one per cell, in a rectangular array. There may be more than one object per matrix cell. When there is, the objects in the cell are laid out on top of each other, the last one being shown initially. To allow for cell-spanning (see below) there may be no object in a matrix cell (i.e., the matrix cell may be nil). The first row and column cannot contain nil values.

  SPAN-RIGHT and SPAN-DOWN are each a matrix whose elements specify whether a plot occupies more than a single plotcell within a row or column. Each entry must be a non-negative integer indicating how many cells are spanned, counting from the current plotcell. Plotcells which are nil (are spanned and have no plot) have a span value of zero. 

  Plots are all same width and height unless REL-WIDTHS or REL-HEIGHTS are used (REL-WIDTHS and REL-HEIGHTS must be a list of nr or nc values, respectively, where nr=number of spreadplot rows and nc=number of columns). Column widths are proportional to the REL-WIDTHS values, row-heights to the REL-HEIGHTS values.

  The spreadplot is contained within CONTAINER whose size is not greater than SIZE. Due to aspect-ratio constraints the size may be smaller than SIZE. By default, SIZE is equal to the usable portion of the screen (the part not occupied by MS-Windows toolbars). This size is calculated by the (EFECTIVE-SCREEN-SIZE) function. The plots are shown if SHOW is T (the default is NIL). 

  SUPPLEMENTAL-PLOT is a plot or dialog box object. SUPPLEMENTAL-PLOT is located adjacent to the upper right edge of the PLOTMATRIX.  The spreadplot cells consist of objects identified in PLOTMATRIX, plus, if not nil, SUPPLEMENTAL-PLOT. Note that containers and the supplemental plot do not yield an ascethetically pleasing result!

  When LOCAL-LINKS is T (the default value), the spreadplot plots can be linked only to themselves, and not to other plots. They can be linked to other plots otherwise (even hidden plots). 

  STATISTICAL-OBJECT is an optional object identification of the model or data object that is creating the spreadplot (nil, the default, when there is none). 

  MENU-TITLE specifies the title of the spreadplot menu (nil for no menu).  


Here is the general idea for how spreadplot messaging works: 

When a plot in a spreadplot experiences some change, it sends a message to the spreadplot about the details of the change. Then, if the message needs to be processed by the spreadplot's statistical object (i.e., its model, transf, or data object) the spreadplot in turn relays this same message to the statistical object so that it knows that a change has been made and what the change is. Then the statistical object processes the message and sends the results to the spreadplot. Then the spreadplot broadcasts either the original (when the statistical object isn't used) or the results of the processed original message (when the statistical object was used) to every plot in the spreadplot. 

The specific messages that do this, and the sequence of actions, is as follows:

1) An individual plot begins the process by sending the 
          :UPDATE-SPREADPLOT (i j &rest args &key (use-statobj nil))
message to the spreadplot. If USE-STATOBJ is T then the message is relayed to the statistical object which processes it and sends the results back via another UPDATE-SPREADPLOT message in which USE-STATOBJ must be NIL, and which must have the same values for values I and J. When USE-STATOBJ is NIL, the message is broadcast via the update-plotcell message to all plots so that they can update themselves. The arguments I and J are two numbers which identify the message uniquely, usually the row and column of the sending plotcell, but if a plotcell can send more than one type of message than another identifing method must be used. All of the REST arguments must be a union of arguments needed by all receiving plotcells, each of which must decide which arguments it needs.

Steps 2 and 3 are skipped unless USE-STATOBJ is T

2) When USE-STATOBJ was T in the preceeding step, the spreadplot object sends
          :UPDATE-STATOBJ (I J &REST ARGS)
to STATOBJ with the same arguments as were sent to the spreadplot (except for USE-STATOBJ). The particular statistical object needs to have an :update-statobj method written.

3) The statistical object sends the
          :UPDATE-SPREADPLOT (i j &rest args)
to the speadplot. Here I and J must be the same as were received by the statistical object, but args has changed. USE-STATOBJ must not be used.

4) The spreadplot object broadcasts the
          :UPDATE-PLOTCELL (i j &rest args)
message to all of its plots. Each plot that needs to respond to the message must have a unique UPDATE-PLOTCELL message written. They need to know how to respond to only certain I-J messages, not all. Args is either what was sent by the originating plotcell or the statistical object. Near the beginning of the sprdplot.lsp file is a dummy :update-plotcell method which is defined for all graphs and dialogs and which does nothing except ignore any messages that are sent."
